<!DOCTYPE HTML>
<html>
    <head>
    </head>
    <body bgcolor=silver>

        <!-- Source Scripts -->
        <script src="scripts/game.js"></script>

        <!-- Main Canvas -->
        <canvas id="mainCanvas" width="1280" height="720"></canvas>

        <!-- Main Script -->
        <script>
            var game = new Game();

            window.requestAnimFrame = (function(callback) {
                return window.requestAnimationFrame ||
                        window.webkitRequestAnimationFrame ||
                        window.mozRequestAnimationFrame ||
                        window.oRequestAnimationFrame ||
                        window.msRequestAnimationFrame ||
                        function(callback) {
                            window.setTimeout(callback, 1000 / 60);
                        };
            })();

            function animate() {
                var mainContext = mainCanvas.getContext("2d");

                game.update();

                game.draw(mainContext);

                requestAnimFrame(animate);
            }

            window.onload = animate;
        </script>
    </body>
</html>